import websocket from '@/utils/websocket'
// 发群聊消息
export function sendAllWebSocket() {
  return websocket({
    url: '/sendAllWebSocket',
    headers: {
      isToken: true,
      repeatSubmit: false
    },
    method: 'get'
  })
}

// 发私聊消息
export function sendOneWebSocket(msg,userId) {
  const data = {
    message:msg,
    userId:userId
  }
  return websocket({
    url: '/sendOneWebSocket',
    headers: {
      isToken: true,
      repeatSubmit: false
    },
    method: 'post',
    data:data
  })
}